package com.example.hospital.respository;

import com.example.model.domain.entity.hospital.Hospital;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * @Author juzipi
 * @Date 2021/7/10 11:09
 * @Info
 */
public interface HospitalRepository extends MongoRepository<Hospital,String> {

    /**
     * 根据hoscode查询Hospital
     * @param hoscode
     * @return Hospital
     */
    Hospital getHospitalByHoscode(String hoscode);

    /**
     * 根据id查询Hospital
     * @param id
     * @return
     */
    Hospital getHospitalById(String id);

    /**
     * 根据 hosname 查询 List<Hospital>
     * @param hosname
     * @return
     */
    List<Hospital> getHospitalByHosname(String hosname);
}
